<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <div>
    <button onclick="minus()">-</button>
    <span>0</span>
    <button onclick="add()">+</button>
  </div>
  <script>
      let count=0;
      let span=document.querySelector("span");
      function minus(){
          count--
          span.innerText=count;
      }
      function add(){
          count++
          span.innerText=count;
      }
  </script>
</body>
</html>